

<template>
  <el-date-picker v-model="date"
                  type="date"
                  placeholder="选择日期"
                  format="YYYY-MM-DD"
                  value-format="YYYY-MM-DD"
                  @change="console.log(date)"
  ></el-date-picker>

  <el-date-picker v-model="dates"
                  type="datetimerange"
                  placeholder="选择日期"
                  format="YYYY-MM-DD HH:MM:SS"
                  value-format="YYYY-MM-DD HH:MM:SS"
                  @change="console.log(dates)"
  ></el-date-picker>


</template>

<script setup>
import {ref} from "vue";

const date = ref('');
const dates = ref([]);

</script>

<style scoped>

</style>